// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
  env:'cloud1-5gmogmij8ced9612'
})

// 云函数入口函数
exports.main = async (event, context) => {
  const wxContext = cloud.getWXContext()
  const token= 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx0f8f26e447003a8b&secret=617edb4e22a33f1693904d9d7424c416'
  const access_token = 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token'
  return {
    event,
    openid: wxContext.OPENID,
    appid: wxContext.APPID,
    unionid: wxContext.UNIONID,
    token:token,
    access_token:access_token
  }
}